/**
 * 
 * 广州锐鹏计算机科技有限公司（www.ruipengkj.com）
 * 
 * 
 * Copyright (c) 2011-2012 RUIPENGKJ.Co.Ltd. All rights reserved.
 * 
 * */
package com.ruipengkj.bean;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * 说明：
 * Entity Name 资金出入单
 * @Author：李智深
 * @Date：2012-03-14
 */
@Entity
@Table(name="ruipeng_tb_TMoneyInOut")
public class TMoneyInOut implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private String InOutID;//资金出入编号CHAR(15) PK
	
	private byte Type;//出入类型1为收款 2为出款
	
	private String PersonID;//出款人/收款人CHAR(15)
	
	private byte SourceType;//出入原因类型TINYINT  1为采购引起的出款 2为采购退货引起收款3为销售引起的收款 4为销售退货引起的出款 5为充值收款 10为费用单 
//	1为采购引起的出款
//	2为采购退货引起收款
//	3为销售引起的收款
//	4为销售退货引起的出款
//	5为充值收款
//	6为商品报损出款
//	7为物品领用出款
//	8为其他方式出库出款
	private String Source;//原因单据编号CHAR(15)
	
	private boolean IsDone;//是否已经完成
	
	private String Operator;//经手人CHAR(15)
	
	private Date HappenTime;//操作时间DATETIME
	
	private boolean IsChecked;//是否审核
	
	private String Checker;//审核人CHAR(15)
	
	private Date CheckTime;//审核时间DATETIME
	
	private Date endTime;//结束时间  查询条件 不进数据库
	
	private double gross;//资金总额  不进数据库
	
	private String time;//时间，资金报表所用，不进数据库
	
	private TEmployee TEmployee;//操作人信息，不进入数据库，报表查询使用
	
	public TMoneyInOut(){}
	public TMoneyInOut(String inOutID, byte type, String personID,
			Date happenTime, String source, byte sourceType) {
		super();
		InOutID = inOutID;
		Type = type;
		PersonID = personID;
		HappenTime = happenTime;
		Source = source;
		SourceType = sourceType;
	}

	@Id
	@Column(name = "InOutID", length=15)
	public String getInOutID() {
		return InOutID;
	}

	public void setInOutID(String inOutID) {
		InOutID = inOutID;
	}

	@Column(name = "Type")
	public byte getType() {
		return Type;
	}

	public void setType(byte type) {
		Type = type;
	}

	@Column(name = "PersonID", length=15)
	public String getPersonID() {
		return PersonID;
	}

	public void setPersonID(String personID) {
		PersonID = personID;
	}

	@Column(name = "SourceType")
	public byte getSourceType() {
		return SourceType;
	}

	public void setSourceType(byte sourceType) {
		SourceType = sourceType;
	}

	@Column(name = "Source", length=15)
	public String getSource() {
		return Source;
	}

	public void setSource(String source) {
		Source = source;
	}

	@Column(name = "IsDone")
	public boolean isIsDone() {
		return IsDone;
	}

	public void setIsDone(boolean isDone) {
		IsDone = isDone;
	}

	@Column(name = "Operator", length=15)
	public String getOperator() {
		return Operator;
	}

	public void setOperator(String operator) {
		Operator = operator;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "HappenTime", nullable = false, length = 19)
	public Date getHappenTime() {
		return HappenTime;
	}

	public void setHappenTime(Date happenTime) {
		HappenTime = happenTime;
	}

	@Column(name = "IsChecked")
	public boolean isIsChecked() {
		return IsChecked;
	}

	public void setIsChecked(boolean isChecked) {
		IsChecked = isChecked;
	}

	@Column(name = "Checker", length=15)
	public String getChecker() {
		return Checker;
	}

	public void setChecker(String checker) {
		Checker = checker;
	}

	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "CheckTime", nullable = false, length = 19)
	public Date getCheckTime() {
		return CheckTime;
	}

	public void setCheckTime(Date checkTime) {
		CheckTime = checkTime;
	}
	
	@Transient
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@Transient
	public double getGross() {
		return gross;
	}
	public void setGross(double gross) {
		this.gross = gross;
	}
	
	@Transient
	public String getTime() {
		return time;
	}
	public void setTime(String time) {
		this.time = time;
	}
	@Transient
	public TEmployee getTEmployee() {
		return TEmployee;
	}

	public void setTEmployee(TEmployee tEmployee) {
		TEmployee = tEmployee;
	}
}
